Skip to content

Conversation

goto-bus-stop
Copy link
Owner

@goto-bus-stop goto-bus-stop commented Apr 6, 2018

Supposed to look like:

splitRequire.capture(function (ondone) {
  ssr.render(state, ondone)
}, function (err, result, bundles) {
  // bundles is array of splitRequire()'d entry points
})
// or
var { bundles, result } = await splitRequire.capture(async function () {
  return await ssr.render(state)
})

@diffcunha
Copy link

Very interesting

@goto-bus-stop
Copy link
Owner Author

we probably need some sort of manifest file to relate the file path on disk to the dynamic bundle too

@diffcunha
Copy link

That makes sense, I also made that with choo-bundles, where the browserify plugin is heavily inspired in split-require. Unfortunately I needed more than the manifest so I couldn’t just extend split-require. Nevertheless I have some code to handle that there https://github.com/nearform/choo-bundles

@goto-bus-stop goto-bus-stop changed the base branch from master to default November 19, 2020 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants